package org.lyy.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.lyy.entity.OrderDetail;
import org.lyy.entity.ProductInfo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderDetailDao {

    @Insert("insert into orderDetail(orderId,productId,productName,num,productPrice,productKind,productPaid) values(#{orderId},#{productId},#{productName},#{num},#{productPrice},#{productKind},#{productPaid})")
    public void save(OrderDetail orderDetail);

    @Delete("delete from orderDetail where orderId=#{orderId}")
    public void delete(String orderId);

    @Select("select * from orderDetail where orderId=#{orderId}")
    public List<OrderDetail> selectOrderId(String orderId);
}
